package com.douban.view
{
	import mx.core.UIComponent;
	
	public class VolControlBar extends UIComponent
	{
		public function VolControlBar(width:Number)
		{
			super();
			this.width = width;
			this.height = 5;
		}
		
		private var _xp:Number;
		public function setPos(xPercent:Number):void{
			_xp = xPercent;
			this.graphics.clear();
			this.graphics.beginFill(0x000000,1);
			this.graphics.drawRect(0,0,xPercent*this.width,this.height);
			this.graphics.endFill();
			this.graphics.beginFill(0xfcfcfc,1);
			this.graphics.drawRect((xPercent)*this.width,0,(1-xPercent)*this.width,this.height);
			this.graphics.endFill();
		}
	}
}